package com.ffyc.cemp.services.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ffyc.cemp.dao.mapper.IHallMapper;
import com.ffyc.cemp.domain.entity.Hall;
import com.ffyc.cemp.services.service.IHallService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
@Service
public class HallServiceImpl implements IHallService {
    @Autowired
    private IHallMapper hallMapper;

    @Override
    public List<Hall> findHallsByCinema(int cinemaId) {
        LambdaQueryWrapper<Hall> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        lambdaQueryWrapper.eq(Hall::getCinema, cinemaId);

        return hallMapper.selectList(lambdaQueryWrapper);
    }
}
